<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<head>

    <title>发现-笔飞美术作品</title>
    <script type="text/javascript" src="/js/jquery-1.4.3.min.js"></script>
       <%@include file="../common/jspcommon.jsp"%>
       <%@include file="../common/css.jsp"%>
          <script type="text/javascript" src="/third/My97DatePicker/WdatePicker.js"></script>
          <link rel="stylesheet" type="text/css" href="/css/style_zlg.css" />
          <link rel="stylesheet" type="text/css" href="/css/style_fx.css" />
          <link rel="stylesheet" type="text/css" href="/css/showImg.css" />
		  <script type="text/javascript" src="/js/jqueryui.js"></script>
		  <script type="text/javascript" src="/js/jquery.mousewheel.min.js"></script>
		  <script type="text/javascript" src="/js/jquery.iviewer.js"></script>
		  <script type="text/javascript" src="/js/zoomimg.js"></script>
</head>
<body>
<div id="box">
    <%@include file="../common/header.jsp" %>
    <div id="main_div">
        <div class="main_div_top3">
            <div class="t_1">${artPic.title}</div>
        </div>
        
        <div class="main_div_left2 mt20">
            <div class="div_top_sc">
                <span class="fl"><a href="#" onclick="ART.lookPic('${artPic.identifier}')" ><img src="../images/p24.jpg" alt="" /></a></span><span class="fl">　喜欢这个作品吗？喜欢就添加到您的收藏夹。</span>
            </div>
            
            <div class="zp_show mt20" style="width: 534px">
                <a href="#"><img id="BigPic" src="${artPic.imagePath}" alt="${artPic.title}" /></a>
            </div>
            <div class="zp_fd">
                <a href="javascript:;" id="zooming"  ><img src="../images/btn_fd.jpg" alt=""/></a>
            </div>
            <div class="fx_img_list">
                <ul>
                	<c:if test="${!empty artPic.imagePath}">
                    	<li><a href="#"><img src="${artPic.imagePath}_100x100" onmouseover="javascript:document.getElementById('BigPic').src='${artPic.imagePath}';" alt=""/></a></li>
                   </c:if>
                    <c:if test="${!empty artPic.imagePath2}">
                   		<li><a href="#"><img src="${artPic.imagePath2}_100x100" onmouseover="javascript:document.getElementById('BigPic').src='${artPic.imagePath2}';" alt=""/></a></li>
                   </c:if>
                   <c:if test="${!empty artPic.imagePath3}">
                    	<li><a href="#"><img src="${artPic.imagePath3}_100x100" onmouseover="javascript:document.getElementById('BigPic').src='${artPic.imagePath3}';" alt=""/></a></li>
                    </c:if>
                    <c:if test="${!empty artPic.imagePath4}">
                    <li><a href="#"><img src="${artPic.imagePath4}_100x100" onmouseover="javascript:document.getElementById('BigPic').src='${artPic.imagePath4}';" alt=""/></a></li>
               	 </c:if>
                </ul>
            </div>

            <div class="fx_zpjj">
                <h2>作品简介</h2>
                <div class="wz">
             		${artPic.content}
                </div>
            </div>
            
            <div class="zp_list3">
                <h2><a onclick="commentList('${artPic.identifier}');">评论</a></h2>
                <ul>
                	<c:forEach items="${commentList}" var="comment">
	                    <li>
	                        <p><a href="#">
	                       		 <img src="${comment.artMember.avatar}" alt=""/>
	                        </a>${comment.artMember.nickname}</p>
	                        <p>${comment.content }</p>
	                    </li>
                    </c:forEach>
                </ul>
                <div class="mt20 fl">
                    <textarea id="TextArea1" class="input_ask" cols="20" rows="2"></textarea>
                    <c:if test="${onlineUser.member!=null }">
                    	<input id="Submit1" type="submit" class="btn_fbpl" value="" onclick="saveComment('${artPic.identifier}')"/>
                    </c:if>
                	 <c:if test="${onlineUser.member==null }"><input id="Submit1" type="submit" class="btn_fbpl" value="" onclick="login();"/> </c:if>
                </div>
                
            </div>
            
            <div class="zp_list2">
                <h2>其他同类作品</h2>
                <ul>
                	<c:forEach items="${sameClassPic}" var="same">
                   		 <li><a href="#"><img src="${same.imagePath}_100x100" alt=""/></a></li>
                    </c:forEach>
                </ul>
            </div>
        </div>
        <div class="main_div_right2 mt20">

            <div class="right_div3">
                <div class="right_div3_1"><span class="style4">
                <c:if test="${!empty artPic.priceLow }"><c:if test="${ artPic.priceLow >0 }">  <span class="fl"><img src="../images/p25.jpg" alt="" /></span><span class="fl"> <del>￥${artPic.price }</del> ￥${artPic.priceLow }</span></c:if></c:if>
                <c:if test="${empty artPic.priceLow || artPic.priceLow==0}">	￥${artPic.price}</c:if>
                </span><span>&nbsp;仅此1件</span><c:if test="${! empty artPic.madeLink }"><a style="cursor: pointer;" href="${artPic.madeLink}" target="_blank"><span class="style11">(相关作品可接受定制)</a></span></c:if>
                </div>
                
                <div class="right_div3_2 mt20">
                	<c:if test="${!artPic.isForward }"><p><a href="#" onclick="buyArt('${artPic.identifier}')"><img src="../images/btn_jrgwc.jpg" alt="" /></a></p></c:if>
                    <c:if test="${artPic.isForward }"><p><a href="#"><img src="../images/btn_ys.jpg" alt="" /></a></p></c:if>
                    <div class="btn_share">
                        <ul class="buttons">
                            <li><a href="#" style="margin-bottom: 10px" onclick="ART.lookPic('${artPic.identifier}')" ><img src="../images/btn_xs.jpg" alt="" /></a></li>
                            <li class="button share-this"><a href="#" class="jiathis jiathis_txt jtico jtico_jiathis"><img src="../images/btn_fx2.jpg" alt="" /></a></li>
                        </ul>                    
                        <!-- JiaThis Button BEGIN -->
                        <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1358994979671444" charset="utf-8"></script>
                        <!-- JiaThis Button END -->
                    </div>
                </div>
                <div class="right_div3_3 mt20">
                    <p><b>材质：</b>${artPic.materialName}</p>
                    <p><b>尺寸：</b>${artPic.artSizeName}</p>
                    <p><b>标签：</b>${artPic.tagName}</p>
                    <p><b>分类：</b>${artPic.artClassName}</p>
                    <p><b>建议用途：</b>${artPic.useName}</p>
                    <p><b>适宜空间：</b>${artPic.groundName}</p>
                    <p style="border-top:solid 1px #e2e2e2; margin-top:10px; padding-top:10px;"><span class="icon_p19">欣赏：${artPic.loveAmount}</span><span class="icon_p17">浏览：${artPic.viewAmount}</span><span class="icon_p20">评论：${commentCount }</span></p>
                </div>
                 <div class="right_div3_3 mt20">
                    <p><b>- 该画家的全部作品</b></p>
                    <div class="img_list">
                    <ul>
                   	 <c:forEach items="${artistPicList}" var="artList">
                        	<li><a href="#" onclick="fart('${artList.artPic.identifier}')"><img src="${artList.artPic.imagePath}_100x100" alt="" /></a></li>
                       </c:forEach>
                    </ul>
                     <li><a href="/fartistInfo.htm?artistId=${artArtist.id}"><p><span class="font1">${allPicNumByArtistId }</span><br />个作品</a></p></li>
                    </div>
                </div>
                <div class="right_div3_3 mt20">
                    <p><a href="/fartistInfo.htm?artistId=${artArtist.id}"><img src="${artArtist.photo}_100x100" alt="" style="float:left; margin-right:10px;" /></a></p>
                    <div style="line-height:20px;">
                        <p><a href="/fartistInfo.htm?artistId=${artArtist.id}"><b>${artArtist.name }</b></a></p>
                        <p><a href="/fartist.htm?province=${artArtist.provinceCode}">${artArtist.city }，${artArtist.province }</a></p>
                        <p>毕业院校：<a href="/fartist.htm?school=${artArtist.schoolid}">${artArtist.schoolName }</a></p>
                        <p><span class="btn_gz"><a href="#" onclick="ART.likeArtArtist('${artArtist.id}')"><img src="../images/btn_gz.jpg" alt="" /></a></span></p>
                        <p style="border-top:solid 1px #e2e2e2; margin-top:10px; padding-top:10px; float:left;"><span class="icon_p19">欣赏：${allCount.loveAmount }</span><span class="icon_p17">浏览：${allCount.viewAmount }</span><span class="icon_p18">关注他的：${artArtist.likeAmount}</span></p>
                    </div>
                </div>
            </div>
        </div>
        <%@include file="../common/footer.jsp" %>	
    </div>
</div>
 <script type="text/javascript">
	 function saveComment(picId){
		 $.post("/saveComment.htm",  {
			 picId:picId,
			 content:$("#TextArea1").val()
			}, function(data){
					window.location.href="/fart.htm?id="+picId;
				if(data=="error"){
					alert("评论失败了，请稍后。");
				}
			});
	 }
	 function login(){
			alert("请登录！");
			window.location.href="/login.htm";
		}
	 function commentList(picId){
		 window.location.href="/cList.htm?picId="+picId;
	 }
	 function made(){
		 window.location.href="/made.htm";
	 }
	 $(function(){
			var tit,imgsrc;
			$("#zooming").click(function(){
				tit=$("#BigPic").attr("alt"),imgsrc=$("#BigPic").attr("src");
				if(!$("div.iview_box").length){
					var myzoom=new ShowView({
						unloadOnHide:true,//完全移除弹出层
						title:tit,
						afterShow:function(){
							var iv1 = $("#iview_img_container").iviewer({
							   src: imgsrc, //每次需传入不同图片参数
							   zoom:100,
							   update_on_resize: true,
							   zoom_animation: true,
							   mousewheel: true,
							   onMouseMove: function(ev, coords) { },
							   onStartDrag: function(ev, coords) { }, //this image will not be dragged
							   onDrag: function(ev, coords) { }
							});
							$("#iview_zi").click(function(){ iv1.iviewer('zoom_by', 1); }); 
							$("#iview_zo").click(function(){ iv1.iviewer('zoom_by', -1); }); 
							$("#iview_reset").click(function(){ iv1.iviewer('set_zoom', 100); }); 
						}	
					});	
				}else{
					ShowView.getView($("div.iview_box")).show();
				}	
			});	
		});
</script>

</body>
</html>
